[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
private Access Restriction Modifier
private access_specifier
A public object member can be used by any function in the program; a
private member can only be accessed by members of that object or by
friend objects. By default, the members of classes are private, and
the members of structs and unions public.
-------------------------------- Example ---------------------------------
Note that in this example, since class members are private by
default, the private keyword is not actually necessary.
class birdwatch {
private:
int num_finches;
int num_seagulls;
public:
int finch_spotted(void);
int seagull_spotted(void);
};
See Also:
protected
public
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson